<!DOCTYPE html>
<html lang="en">
<head>
<title>团队信息</title>

<link rel="stylesheet" type="text/css" href="css/reset.css" media="screen" />
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="css/common.css" rel="stylesheet" media="screen">
<link href="css/info.css" rel="stylesheet" media="screen">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="js/jquery-1.7.1.min.js"></script>
<script src="js/jquery.tmpl.js"></script>
<script>

$(document).ready(function(){
	
$(".bar a").hover(
 function () {
    var c = $(this).attr("class");
	var s = c.substring(c.length-7,c.length);
	if(s!="onclick")
	$(this).attr("class",c+"_hover");
  },
  function () {
    var c = $(this).attr("class");
	var s = c.substring(c.length-7,c.length);
	if(s!="onclick")
	$(this).attr("class",c.substring(0,c.length-6));
  }
);

}); 

</script>
</head>
<body>
<div class="header">
	<a href="#"><img height="70" width="199" src="images/LOGO.png"></a>
    <button class="btn" style="float:right; margin-right:30px; margin-top:5px;" type="button">注销</button>
    <div class="clear"></div>
    <li class="bar"><a class="bar_info_onclick" href="#"></a></li>
    <li class="bar"><a class="bar_resource" href="#"></a></li>
    <li class="bar"><a class="bar_project" href="#"></a></li>
    <li class="bar"><a class="bar_team" href="./Staff"></a></li>
    <li class="bar"><a class="bar_future" href="#"></a></li>
</div>
<div class="content"> 
	<div class="info">
    	<div class="infoHeader">
        	<span class="Headerfont">近期通知：</span>
            <button class="btn" style="float:right; margin-right:30px; margin-top:5px;" type="button">新通知</button>
        </div>
        <div id="information" class="infoContent"></div>
        <div class="infoPage">
        	    <div class="pagination" style="margin:0;">  
                    <ul>  
                        <li><a class="fenye" href="javascript:void(0)" onclick="firstPage1();">首页</a></li>  
                        <li><a class="fenye" href="javascript:void(0)" onclick="prePage1();">前一页</a></li>  
                 
                        <!-- 跳转 -->  
                        <li><a class="fenye"> 第 <input id="infor_page" type="text" maxlength="2" style="margin:2px;; width: 20px; height: 16px;">页 </a></li>  
                        <li><a class="fenye"  id="skip" href="javascript:void(0)" onclick="skipPage1();">转到</a></li>  
                  
                        <!-- 下一页按钮 -->  
                            <li><a class="fenye" href="javascript:void(0)" onclick="nextPage1();">下一页</a></li>  
                  
                        <!-- 分页尾页按钮 -->  
                            <li><a class="fenye" href="javascript:void(0)" onclick="lastPage1();">尾页</a></li>  
                    </ul>  
                </div>  
        </div>
    </div>
	<div class="message">
    	<div class="messageHeader">
        	<span class="Headerfont">信息：</span>
            <button class="btn" style="float:right; margin-right:30px; margin-top:5px;" type="button">新信息</button>
        </div>
        <div class="messageContent"></div>
        <div class="messagPage">
             <div class="pagination" style="margin:0;">  
                <ul>  
                    <li><a class="fenye" href="javascript:void(0)" onclick="firstPage2();">首页</a></li>  
                    <li><a class="fenye" href="javascript:void(0)" onclick="prePage2();">前一页</a></li>  
             
                    <!-- 跳转 -->  
                    <li><a class="fenye"> 第 <input id="notice_page" type="text" maxlength="2" style="margin:2px;; width: 20px; height: 16px;">页 </a></li>  
                    <li><a class="fenye"  id="skip" href="javascript:void(0)" onclick="skipPage2();">转到</a></li>  
              
                    <!-- 下一页按钮 -->  
                    <li><a class="fenye" href="javascript:void(0)" onclick="nextPage2();">下一页</a></li>  
              
                    <!-- 分页尾页按钮 -->  
                    <li><a class="fenye" href="javascript:void(0)" onclick="lastPage2(0);">尾页</a></li>  
                </ul>  
            </div>  
        </div>
    </div>
</div>
<div class="foot"></div>
<script id="infor_row" type="text/x-jquery-tmpl">
<div class="infor"><span class="infor_title">${title}</span><span class="infor_data">${data}</span></div>
</script>
<script>
$("#infor_page").val(parseInt(1));   
$("#notice_page").val(parseInt(1));

var totlePage=1;
var nowpage=1;
$('#information').html("");
$.ajax({
	   type: "POST",
	   url: "infoPage/get_info_page/"+1,
	  // data: "page="+1,
	   success: function(msg){
		   var json = eval('(' + msg + ')');  
		    totlePage = json.totlePage;
			for ( i in json.content){
			$('#infor_row').tmpl([{"title":json.content[i].title,"data":json.content[i].data}]).appendTo('#information');
			}
	   }
});

function firstPage1(){   
	nowpage=1;
	$('#information').html("");
	$.ajax({
		   type: "POST",
		   url: "infoPage/get_info_page/"+nowpage,
		   success: function(msg){
			   var json = eval('(' + msg + ')');
				for ( i in json.content){
				$('#infor_row').tmpl([{"title":json.content[i].title,"data":json.content[i].data}]).appendTo('#information');
				}
		   }
	});

};
function skipPage1(){   
	var nowpage =parseInt($("#infor_page").val().trim());
	if(parseInt($("#infor_page").val().trim())>=1&&parseInt($("#infor_page").val().trim())<=totlePage)
	{
		$("#infor_page").val(nowpage);   
		$('#information').html("");
		$.ajax({
			   type: "POST",
			   url: "infoPage/get_info_page/"+nowpage,
			  // data: "page="+1,
			   success: function(msg){
				   var json = eval('(' + msg + ')');  
					for ( i in json.content){
					$('#infor_row').tmpl([{"title":json.content[i].title,"data":json.content[i].data}]).appendTo('#information');
					}
			   }
		});

	}
};
function nextPage1(){   
if(parseInt($("#infor_page").val().trim())<totlePage)
{
	nowpage++;
	$("#infor_page").val(nowpage);   
	$('#information').html("");
	$.ajax({
		   type: "POST",
		   url: "infoPage/get_info_page/"+nowpage,
		  // data: "page="+1,
		   success: function(msg){
			   var json = eval('(' + msg + ')');  
				for ( i in json.content){
				$('#infor_row').tmpl([{"title":json.content[i].title,"data":json.content[i].data}]).appendTo('#information');
				}
		   }
	});

}



};
function prePage1(){   
	if(parseInt($("#infor_page").val().trim())>1)
	{
		nowpage--;
		$("#infor_page").val(nowpage);   
		$('#information').html("");
		$.ajax({
			   type: "POST",
			   url: "infoPage/get_info_page/"+nowpage,
			  // data: "page="+1,
			   success: function(msg){
				   var json = eval('(' + msg + ')');  
					for ( i in json.content){
					$('#infor_row').tmpl([{"title":json.content[i].title,"data":json.content[i].data}]).appendTo('#information');
					}
			   }
		});

	}
};
function lastPage1(){   
	nowpage=totlePage;
	$('#information').html("");
	$.ajax({
		   type: "POST",
		   url: "infoPage/get_info_page/"+nowpage,
		   success: function(msg){
			   var json = eval('(' + msg + ')');
				for ( i in json.content){
				$('#infor_row').tmpl([{"title":json.content[i].title,"data":json.content[i].data}]).appendTo('#information');
				}
		   }
	});
};
</script>  
  </body>
</html>